<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:a4j="http://richfaces.org/a4j">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateTaskTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <table>
                <tr>
                    <td>
                        <h:panelGroup id="tascrmessagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.CreateTaskLabel_prioritaet}" for="prioritaet" />
                    <h:inputText id="prioritaet" value="#{taskController.selected.prioritaet}" title="#{bundle.CreateTaskTitle_prioritaet}" required="true" requiredMessage="#{bundle.CreateTaskRequiredMessage_prioritaet}"/>
                    <h:outputLabel value="#{bundle.CreateTaskLabel_effort}" for="effort" />
                    <h:inputText id="effort" value="#{taskController.selected.effort}" title="#{bundle.CreateTaskTitle_effort}" required="true" requiredMessage="#{bundle.CreateTaskRequiredMessage_effort}"/>
                    <h:outputLabel value="#{bundle.CreateTaskLabel_userstory}" for="userstory" />
                    <h:selectOneMenu id="userstory" value="#{taskController.selected.userstory}" title="#{bundle.CreateTaskTitle_userstory}" >
                        <f:selectItems value="#{userstoryController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.CreateTaskLabel_sprint}" for="sprint" />
                    <h:selectOneMenu id="sprint" value="#{taskController.selected.sprint}" title="#{bundle.CreateTaskTitle_sprint}" >
                        <f:selectItems value="#{sprintController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.CreateTaskLabel_taskid}" for="taskid" />
                    <h:inputText id="taskid" value="#{taskController.selected.taskid}" title="#{bundle.CreateTaskTitle_taskid}" required="true" requiredMessage="#{bundle.CreateTaskRequiredMessage_taskid}"/>
                    <h:outputLabel value="#{bundle.CreateTaskLabel_taskbezeichnung}" for="taskbezeichnung" />
                    <h:inputText id="taskbezeichnung" value="#{taskController.selected.taskbezeichnung}" title="#{bundle.CreateTaskTitle_taskbezeichnung}" />
                    <h:outputLabel value="#{bundle.CreateTaskLabel_taskbeschreibung}" for="taskbeschreibung" />
                    <h:inputText id="taskbeschreibung" value="#{taskController.selected.taskbeschreibung}" title="#{bundle.CreateTaskTitle_taskbeschreibung}" />
                </h:panelGrid>
                <br />
                <a4j:commandButton render="taskeditpanel" action="#{taskController.create}" value="#{bundle.CreateTaskSaveLink}" />
                <a4j:commandButton render="taskeditpanel" value="aktualisieren" />
                <br />
                    </h:form>
                </td>
                    <td rowspan="2">
                        <a4j:outputPanel id="taskeditpanel">
                            <ui:include src="Edit.xhtml"/>
                        </a4j:outputPanel>
                    </td>
                </tr>
                <tr>
                    <td>
                        <a4j:outputPanel id="tasklistpanel">
                            #{taskController.prepareList()}
                            <ui:include src="List.xhtml"/>
                        </a4j:outputPanel>
                    </td>
                </tr>
            </table>
            
            
            
        </ui:define>
    </ui:composition>

</html>
